<template>
	<view>
		<!-- 导航栏 -->
		<u-navbar title="服务提醒" :fixed="true" titleStyle="color:rgba(32, 32, 32, 1);font-size:36rpx;font-weight:bold"
			leftIconColor="rgba(32, 32, 32, 1)" leftIconSize="40rpx" :autoBack="true" :placeholder="true"
			height="88rpx">
		</u-navbar>
		<view class="main">
			<view class="messageBox" v-for="item in data" :key="item.mid">
				<view class="dateTime">
					{{item.createTime}}
				</view>
				<view class="Notify">
					<view class="title">
						{{item.headline}}
					</view>
					<view class="textMain">
						{{item.content}}
					</view>
					<!-- 分割线 -->
					<view class="divider"></view>
					<view class="toDetail" v-if="item.correspondingId" @click="jump(item)">
						查看详情 &gt;
					</view>
				</view>
			</view>
		</view>
		<view class="" style="height: 60rpx;"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data: [
				]
			}
		},
		onLoad() {
			this.cread()
		},
		methods: {
			
			async cread() {
				let res = await this.$http.order.remindList()
				this.data = res.data.data.records
			},
			jump(e) {
				if(e.correspondingType==2){
					uni.navigateTo({
						url:'/pages/my/fleetManage/fleetManage?correspondingId='+e.correspondingId+'&msg='+e.content
					})
				}else if(e.correspondingType==3){
					uni.navigateTo({
						url: '/subPackages/order/orderDetail/orderDetail?id=' + e.correspondingId
					})
				}
			},
			
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background-color: #F3F3F3
		;
	}
	.main {
		width: 750rpx;
		box-sizing: border-box;
		padding: 0 20rpx;

		.messageBox {
			>.dateTime {
				width: 100%;
				height: 67rpx;
				display: flex;
				justify-content: center;
				align-items: center;
				color: #888888;
				font-size: 22rpx;
			}

			>.Notify {
				width: 100%;
				background-color: #fff;
				box-sizing: border-box;
				padding: 40rpx 40rpx 0rpx 40rpx;
				border-radius: 10rpx;

				>.title {
					font-size: 30rpx;
					color: #202020;
					font-weight: bold;
				}



				>.textMain {
					color: #666666;
					font-size: 26rpx;
					width: 100%;
					flex-wrap: wrap;
					margin-top: 40rpx;
				}

				>.divider {
					height: 1rpx;
					width: 630rpx;
					background-color: #EEEEEE;
					margin-top: 37rpx;
				}

				>.toDetail {
					color: #404040;
					font-size: 28rpx;
					padding-top: 30rpx;
					padding-bottom: 30rpx;
				}
			}
		}


	}
</style>